
#if !defined(_RTUSTACK_H)
#define _RTUSTACK_H

#include <iostream>
using namespace std;

#include <stdlib.h>
#include <malloc.h>
#include <string.h>
#include <list>
#include <stdio.h>
#include <Windows.h>

#pragma pack(1)

enum MESSAGE_THREAD_TYPE{

	MESSAGE_THREAD_INIT = 1,
	MESSAGE_THREAD_PLAY,
	MESSAGE_THREAD_RECVEDDATA,
	MESSAGE_THREAD_SEND_DATA,
	MESSAGE_THREAD_DECODE_MSG,
	MESSAGE_THREAD_PLAY_MSG,
	MESSAGE_THREAD_STOP_SENDTHREAD,
	MESSAGE_THREAD_STOP_RECVTHREAD,
	MESSAGE_THREAD_STOP_WORKTHREAD,
	MESSAGE_THREAD_SEND_LOST_DATA
};

enum MESSAGE_TYPE{

	VIDEODATA = 1,
	AUDIODATA,
	AMFDATA

};

struct RtuHead{
	short CmdType;
	int Len;
};

struct RtuCmdStart{
	RtuHead BaseHeader;
	char url[200];
	int IP;
	int DataPort;
	int Retransmission_port;
};

struct RtuCmdStartResponse{
	RtuHead BaseHeader;
	short ErrorCode;
	char Url[200];
	int StreamID;
	int ByteRate;
};

struct RtuData{
	RtuHead BaseHeader;
	int StreamID;
	char StreamType;
	int Timestamp;
	double PacketNo;
	int VideoPackNo;
	int AudioPackNo;
	int SliceSum;
	int SliceNo;
	char *DataPayload;
};

#pragma pack()

#endif  //_RTUSTACK_H